package main

import "fmt"

func selectSort(data *[10]int) {
	var index int
	for i:=0;i<len(data)-1;i++{
		index = i
		for j:=i+1;j<len(data);j++{
			if data[index]>data[j] {
				index = j
			}
		}
		temp := data[index]
		data[index] = data[i]
		data[i] = temp
	}
}

func main(){
	var arr = [10]int{4,8,1,0,9,7,2,3,5,6}
	selectSort(&arr)

	for i := range arr {
		fmt.Println(arr[i])
	}
}

